<?php
/**
 * The loop that displays posts.
 *
 * The loop displays the posts and the post content.  See
 * http://codex.wordpress.org/The_Loop to understand it and
 * http://codex.wordpress.org/Template_Tags to understand
 * the tags used in it.
 *
 * This can be overridden in child themes with loop.php or
 * loop-template.php, where 'template' is the loop context
 * requested by a template. For example, loop-index.php would
 * be used if it exists and we ask for the loop with:
 * <code>get_template_part( 'loop', 'index' );</code>
 *
 * @package WordPress
 * @subpackage ceyloan
 * @since ceyloan 1.0
 */
?>
<?php if(have_posts()): 
	while(have_posts()): the_post();?>
                <div <?php post_class(); ?>>
		<div class='artical-post single-post' >
		<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
		<div class='artical-content-left '> <?php if(is_archive()){
			the_excerpt();
		} else{
			the_content();
		} ?>
		<div id='comment-link'>
			<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'ceyloan' ), __( '1 Comment', 'ceyloan' ), __( '% Comments', 'ceyloan' ) ); ?></span>
                        <?php
                        $categories_list = get_the_category_list( __( ', ', 'ceyloan' ) );
                        $tag_list = get_the_tag_list( '', __( ', ', 'ceyloan' ) );
                        if($categories_list){
                           echo " <span class='category-link'>Posted In $categories_list </span>";
                        }
                        if($tag_list){
                            echo " <span class='tag-link'> Tags $tag_list </span>";
                        }
                        ?>
			
                        <?php if ( $wp_query->max_num_pages > 1 ) : ?>
                        <span> Read</span>
                        <?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'ceyloan' ) ); ?>
                        <?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'ceyloan' ) ); ?>
                    <div>
                        <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'ceyloan' ) . '</span>', 'after' => '</div>' ) ); ?>
                    </div>
                       <?php endif;?>
		</div>
<?php $options=ceyloan_get_theme_options();
	if($options['so_sh']==1):
?>
		<div id='share-buttons'>
<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="medium" annotation="none"></g:plusone>

<!-- Place this render call where appropriate -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

<a href="https://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a>
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=233928906624944";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-send="false" data-layout="button_count" data-show-faces="false"></div>
	
		<div class='clearfix'></div>
		</div>
<?php endif; ?>
		<div class='clearfix'></div>
		</div>
		</div>
</div>
		<?php comments_template( '', true ); ?>
		<?php break; ?>
<?php endwhile; endif; ?>